<?php

namespace  app\merchant\controller\user;

use app\merchant\controller\Base;
use app\merchant\model\user\MoneyLog as MoneyLogModel;//余额明细模型
use app\merchant\model\user\BalanceLog as BalanceLogModel;//零钱明细模型
use app\merchant\model\user\PointsLog as PointsLogModel;//积分明细模型
use app\merchant\model\user\DealerLog as DealerLogModel;//佣金明细模型
/**
 * 用户记录控制器
 * Class StoreUser
 * @package app\merchant\controller\user;
 */
class Log extends Base{

    /**
     * 用户余额明细
     * Class StoreUser
     * @package app\merchant\controller\user;
     */
    public function moneyLog(){

        $model = new MoneyLogModel;

        return $this->renderSuccess([
            'list' => $model->getList($this->request->param()),
            // 属性集
            'attributes' => $model::getAttributes(),
        ]);

    }


    /**
     * 用户零钱明细
     * Class StoreUser
     * @package app\merchant\controller\user;
     */
    public function balanceLog(){

        $model = new BalanceLogModel;

        return $this->renderSuccess([
            'list' => $model->getList($this->request->param()),
            // 属性集
            'attributes' => $model::getAttributes(),
        ]);

    }


    /**
     * 用户积分明细
     * Class StoreUser
     * @package app\merchant\controller\user;
     */
    public function pointsLog(){

        $model = new PointsLogModel;

        return $this->renderSuccess([
            'list' => $model->getList($this->request->param()),
            // 属性集
            'attributes' => $model::getAttributes(),
        ]);

    }


    /**
     * 用户佣金明细
     * Class StoreUser
     * @package app\merchant\controller\user;
     */
    public function dealerLog(){

        $model = new DealerLogModel;

        return $this->renderSuccess([
            'list' => $model->getList($this->request->param()),
            // 属性集
            'attributes' => $model::getAttributes(),
        ]);

    }

}
